Reuse babel options and specify polyfills for karma explicitely#1456
Reuse babel options and specify polyfills for karma explicitely#1456
Conversation
| plugins: [ | ||
| ['@babel/proposal-class-properties', {loose: true}], | ||
| ['@babel/transform-runtime', {useESModules}], | ||
| ['@babel/plugin-proposal-export-namespace-from'], |
There was a problem hiding this comment.
I searched for export * as - nothing found
| @@ -0,0 +1,9 @@ | |||
| exports.getBabelOptions = ({useESModules}) => ({ | |||
There was a problem hiding this comment.
Do you remember why we didn't use babel.config.js?
There was a problem hiding this comment.
no, but I would guess the useESModules option is dynamic, that's why?
There was a problem hiding this comment.
Yes, but it can be used only for rollup. There is no difference between inlined and imported helpers.
There was a problem hiding this comment.
using the option for rollup only is fine, it's still better than having the entire babel config duplicted
There was a problem hiding this comment.
Btw, babel 7.13 does not require useESModules flag anymore. Right version is detected automatically.
There was a problem hiding this comment.
then we can remove the flag along with upgrading babel, probably better separately
…true}] the spread is doing a different thing
| return [...style.sheet.cssRules] | ||
| const rulesArr = [] | ||
| const {cssRules} = style.sheet | ||
| for (const key in cssRules) { |
There was a problem hiding this comment.
hah, for in failed in safari ... good catch
|
Released in v10.6.0 |
Fixes #1455
I was looking into why we didn't catch that with tests, it turned out we load all polyfills in karma, but as I was looking I made the babel config reusable, it didn't change anything but still good to have.